package helloworld.admin.assembler.center;

import java.lang.reflect.InvocationTargetException;
import org.apache.commons.beanutils.BeanUtils;
import helloworld.admin.bean.CenterAdminBean;
import helloworld.admin.form.center.CenterForm;

public class CenterDetailAssembler
{
	private CenterDetailAssembler() { }

	public static final CenterAdminBean createCenterDetail(CenterForm form)
	{
		CenterAdminBean center = new CenterAdminBean();
		try
		{
			BeanUtils.copyProperties(center, form);
			//BeanUtils.copyProperties(center.getAddress(), form.getAddress());
		}
		catch (InvocationTargetException ite)
		{
			ite.printStackTrace();	//do nothing for now
		}
		catch (IllegalAccessException iae)
		{
			iae.printStackTrace();	//do nothing for now
		}
		return center;		
	}

}